package com.hjzd.ai.smartpractice.constant;

/**
 * @author pengyonglei
 * @version 1.0.0
 */
public class ServiceConstant {

	public static final Integer SUCCESS_CODE = 0;

	// -1 到 -100 保留用于公共的error_code
	public static final Integer EXCEPTION = -1;
	public static final String EXCEPTION_MESSAGE = "接口异常";
	public static final Integer PARAMS_IS_EMPTY = -2;
	public static final String PARAMS_IS_EMPTY_ERROR_MSG = "参数不完整";
	public static final Integer REQUEST_RESOURCE_IS_NOT_EXIST = -3;
	public static final Integer HAVE_NO_AUTH = -4;

	// 错误码, 均为负整数, 从 -1000 开始
	public static final Integer ASR_ERROR_CODE = -1000;

	// 常量区域
	public static final String MOCK_CUSTOMER_INFO_KEY = "MOCK_CUSTOMER_INFO";	// 模拟的客户信息
	public static final String MOCK_CUSTOMER_UNIQUE_KEY = "MOCK_CUSTOMER_UNIQUE_%s";	// 模拟的客户信息redis key
	public static final String MOCK_CHAT_UNIQUE_KEY = "MOCK_CHAT_UNIQUE_%s";	//  模拟对话的message 的 redis key
	public static final String MOCK_CHAT_SCORE_KEY = "MOCK_CHAT_SCORE_%s";	//  模拟对话的分数的key
	public static final String MOCK_TTS_TYPE = "MOCK_TTS_TYPE";	//模拟的tts的类型
	public static final String  MOCK_REQUEST_AUTHOR_PARAM = "Authorization"; //请求token

	// 得分规则的类型
	public static final String SCORE_RULE_SPEED = "speed";
	public static final String SCORE_RULE_EMOTION = "emotion";
	public static final String SCORE_RULE_TIMEOUT = "timeout";
	public static final String SCORE_RULE_KEYWORDS = "keywords";
	public static final String SCORE_RULE_FLUENCY = "fluency";
	public static final String SCORE_RULE_RELEVANCE = "relevance";

	// 网络区域
	public static final String INTERFERE_API_URL = "http://10.252.7.231:8000/v1/chat/completions";
//	public static final String INTERFERE_API_URL = "http://58.218.199.187:20034/v1/chat/completions";

	//funasr相关参数
	static public final String funasrServerIP = "10.252.7.232";
	static public final String funasrServerPort = "10096";
	static public final String audioStatusStart = "START_AUDIO";
	static public final String audioStatusStop = "STOP_AUDIO";
	static public final int sendChunkSize = 1920;
	//中断TTS语音
	static public final String TTS_VOICE_STOP = "TTS_VOICE_STOP";
	static public final String ASR_PREFIX = "ASR_TXT_";
	static public final String TTS_PREFIX = "TTS_TXT_";
	static public final String FIRST_TTS_PREFIX = "FIRST_TTS_TXT_";
	//推理相关参数
	static public final String inputTextStart = "START_INPUT_TEXT";
	static public final String inputTextStop = "STOP_INPUT_TEXT";

	static public final String replyTextStart = "START_REPLY_TEXT";
	static public final String replyTextStop = "STOP_REPLY_TEXT";

	static public final String replyAudioStart = "START_REPLY_Audio";
	static public final String replyAudioStop = "STOP_REPLY_Audio";
	static public final String SENTENCE_SPLIT_REGEX = "[。！？，、.!?,]";
	static public final int SENTENCE_SPLIT_LIMIT = 8;
	static public final int SENTENCE_SEND_MIN_WORDS_LIMIT = 50;
}
